import Decimal from 'decimal.js-light'
/**
 * 订单列表实付款价格计算
 * @returns {*} 需要 divTenThousand 转换
 */
export function computeOrderPrice(data: any) {
  return data.shopOrderItems.reduce((pre, cur) => {
    return pre.add(new Decimal(cur.num).mul(cur.dealPrice).sub(cur.fixPrice).add(cur.freightPrice))
  }, new Decimal(0))
}
